from django.urls import include, path, re_path

from demo import views
from demo.views import AddArticleView, ArticleDetailView, ArticleUserView, ArticleUpdateView, ArticleDeleteView

urlpatterns = [
    path('test/<str:inf>/', views.test),
    # path("TV",views.TV)
    re_path("^re_TV/(?P<info>[0-9abc]+)/$", views.TV),
    path("nav/<str:classes>", views.nav),
    path("404/", views.not_find, name='not_find'),
    path("index/", views.index, name='index'),
    path('classes/', views.classes, name='classes'),
    path('tab_info/', views.tab_info),
    path('article/add/', AddArticleView.as_view(), name='AddArticle'),
    path('article/<int:id>/', ArticleDetailView.as_view(), name='ArticleDetail'),
    path('article/user/', ArticleUserView.as_view(), name='ArticleUser'),
    path('article/update/<int:id>', ArticleUpdateView.as_view(), name='ArticleUpdate'),
    path('article/delete/<int:id>', ArticleDeleteView.as_view(), name='ArticleDelete'),

]
